using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 装备系统
/// </summary>
[System.Serializable]
public struct ItemAffix
{
    public AffixType type;
    public float value;
    public Element element;
}

[System.Serializable]
public struct CardCost {
    public string resourceType; // 资源类型
    public int amount;          // 消耗数量
}


[System.Serializable]
public struct InventoryItem
{
    public int itemID;

    public int itemAmount;
    
}

[System.Serializable]
public class SerializableVector3 {  
    public float x, y, z;

    public SerializableVector3 (Vector3 pos) { 
        this.x = pos.x; this.y = pos.y; this.z = pos.z;

    }

    public Vector3 ToVector3()
    {
        return new Vector3(x, y, z);
    }

    public Vector2Int ToVector2Int()
    {
        return new Vector2Int((int)x, (int)y);
    }
}

[System.Serializable]
public class SceneItem
{
    public int itemID;

    public SerializableVector3 position;
}

[System.Serializable]
public class SceneFurniture
{
    public int itemID;

    public SerializableVector3 position;

    public int boxIndex;
}

[System.Serializable]
public class TileProperty
{
    
    public Vector2Int tileCoordinate;

    public bool boolTypeValue;

    public GridType gridType;
}

[System.Serializable]
public class TileDetails
{
    public int gridX, gridY;

    public bool canDig;

    public bool canDropItem;

    public bool canPlaceFurniture;

    public bool isNPCObstacie;

    public int daySinceDug = -1;

    public int daySinceWatered = -1;

    public int seedItemID = -1;

    public int growthDays = -1;

    public int daysSinceLastHarvest = -1;

}

[System.Serializable]
public class NPCPosition
{
    public Transform npc;

    public string startScene;

    public Vector3 position;
}

